<?php 
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header', 'admin');
$modelid = 100;
?>
<div class="pad-lr-10">

<form name="myform" action="?m=daoshi&c=admin_daoshi&a=listorder" method="post">
<div class="table-list">
    <table width="100%" cellspacing="0">
        <thead>
            <tr>
            <th width="35" align="center"><input type="checkbox" value="" id="check_box" onclick="selectall('aid[]');"></th>
            <th width="35">排序</th>
            <th>值班人</th>
			<th width="90"align="center">值班地点</th>
			<th  align="center">开始时间</th>
			<th  align="center">结束时间</th>
			<th  align="center">预约人数</th>
			<th  align="center"><?php echo L('operations_manage')?></th>
            </tr>
        </thead>
    <tbody>
 <?php 
if(is_array($data)){
	foreach($data as $announce){
?>   
	<tr>
	<td align="center">
	<input type="checkbox" name="aid[]" value="<?php echo $announce['zhibanid']?>">
	</td>
    <td>
	<input type="text" name="listorder[<?php echo $announce['zhibanid']?>]" value="<?php echo $announce['listorder']?>" size="5" title="越大越靠前">
	</td>
	<td align="center"><a href="?m=daoshi&c=index&a=show&daoshiid=<?php echo $announce['daoshiid']?>" target="_blank" title="<?php echo date('Y-m-d H:i:s', $announce['updatetime'])?>"><?php echo $announce['name'];?></a></td>
	<td align="center"><?php echo $announce['address']?></td>
	<td align="center"><?php echo $announce['starttime'];?></td>
	<td align="center"><?php echo $announce['endtime'];?></td>
	<td align="center"><?php echo $announce['count'];?></td>
	<td align="center">
	<a href="javascript:edit('<?php echo $announce['zhibanid']?>', '<?php echo safe_replace($announce['address'])?>');void(0);"><?php echo L('edit')?></a> 
	</td>
	</tr>
<?php 
	}
}
?>
</tbody>
    </table>
  
    <div class="btn"><label for="check_box"><?php echo L('selected_all')?>/<?php echo L('cancel')?></label>
       <input name="submit" type="submit" class="button" value="排序" onClick="document.myform.action='?m=daoshi&c=admin_daoshi&a=order_zb';return confirm('确认排序吗')">&nbsp;&nbsp;
		<input name="submit" type="submit" class="button" value="<?php echo L('remove_all_selected')?>" onClick="document.myform.action='?m=daoshi&c=admin_daoshi&a=delete_zb';return confirm('<?php echo L('affirm_delete')?>')">&nbsp;&nbsp;</div>  </div>
 <div id="pages"><?php echo $this->db->pages;?></div>
</form>
</div>
</body>
</html>
<script type="text/javascript">
function edit(id, title) {
	window.top.art.dialog({id:'edit'}).close();
	window.top.art.dialog({title:'值班修改--'+title, id:'edit', iframe:'?m=daoshi&c=admin_daoshi&a=edit_zb&aid='+id ,width:'700px',height:'500px'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;
	var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
}
</script>